@extends('layouts.app')

@section('content')
    <heading>{{ __('Login') }}</heading>
    <card>
        <tig-form action="{{ route('login') }}">
            <default-field>
                <template slot="label">{{ __('Name') }}</template>

                <template slot="field">
                    <input id="name" type="text" class="w-full form-control form-input form-input-bordered{{ $errors->has('name') ? ' is-invalid' : '' }}"
                           name="name" value="{{ old('name') }}" required autofocus>

                    @if ($errors->has('name'))
                        <span class="invalid-feedback" role="alert">
                                        <strong>{{ $errors->first('name') }}</strong>
                                    </span>
                    @endif
                </template>
            </default-field>

            <default-field>
                <template slot="label">{{ __('Password') }}</template>

                <template slot="field">
                    <input id="password" type="password"
                           class="w-full form-control form-input form-input-bordered{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password"
                           required>

                    @if ($errors->has('password'))
                        <span class="invalid-feedback" role="alert">
                                        <strong>{{ $errors->first('password') }}</strong>
                                    </span>
                    @endif
                </template>
            </default-field>

            <default-field>
                <template slot="field">
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" name="remember"
                               id="remember" {{ old('remember') ? 'checked' : '' }}>

                        <label class="form-check-label" for="remember">
                            {{ __('Remember Me') }}
                        </label>
                    </div>
                </template>
            </default-field>

            <default-field>
                <template slot="field">
                    <button type="submit" class="btn btn-default btn-primary">
                        {{ __('Login') }}
                    </button>

                    {{--@if (Route::has('password.request'))--}}
                    {{--<a class="btn btn-link" href="{{ route('password.request') }}">--}}
                    {{--{{ __('Forgot Your Password?') }}--}}
                    {{--</a>--}}
                    {{--@endif--}}
                </template>
            </default-field>
        </tig-form>
    </card>
@endsection
